package dwz.persistence.mapper;

import dwz.dal.BaseMapper;
import dwz.persistence.beans.SysPermission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysPermissionMapper extends BaseMapper<SysPermission,Integer>{
    Integer isUniquePermissionName(@Param("id") Integer id, @Param("name") String name);
    Integer getChildrenNum(@Param("id") Integer id);
    List<SysPermission> getRolePermission(@Param("id") Integer roleid);
    List<SysPermission> getUserPermission(@Param("id") Integer userid);
    List<SysPermission> getAllPermissionsByUserId(@Param("id") Integer userid);

}
